﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Domain.Dto.LeaveDto
{
    /// <summary>
    /// 请假列表DTO
    /// </summary>
    public class LeaveListDto<T>
    {   
        /// <summary>
        /// 角色ID
        /// </summary>
        public int UserId { get; set; }

        public int PageCount  { get; set; }

        public int TotalCount { get; set; }

        public List<GetInfoDto> list {  get; set; }
    }

    public class GetInfoDto
    {
        /// <summary>
        /// 用户主键
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 请假条主键
        /// </summary>
        public int LeaveId { get; set; }

        /// <summary>
        /// 登录人姓名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 部门ID
        /// </summary>
        public int DepartmentId { get; set; }

        /// <summary>
        /// 请假类型
        /// </summary>
        public string LeaveType { get; set; }

        /// <summary>
        /// 请假开始时间
        /// </summary>
        public DateTime LeaveStartTime { get; set; }

        /// <summary>
        /// 请假结束时间
        /// </summary>
        public DateTime LeaveEndTime { get; set; }

        /// <summary>
        /// 总工时(H)
        /// </summary>
        public decimal TotalWorkTime { get; set; }

        /// <summary>
        /// 报到时间
        /// </summary>
        public DateTime RegistrationTime { get; set; }

        /// <summary>
        /// 请假事由
        /// </summary>
        public string SubjectMatter { get; set; }

        /// <summary>
        /// 部门领导
        /// </summary>
        public string DepartmentLeader { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        public bool ToExamine { get; set; } = false;

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatedBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedDate { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdatedBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdatedDate { get; set; }

        /// <summary>
        /// 删除人
        /// </summary>
        public string? DeletedBy { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? DeletedDate { get; set; }

        /// <summary>
        /// 逻辑状态
        /// </summary>
        public bool IsDeleted { get; set; } = false;

        /// <summary>
        /// 是否为默认领导
        /// </summary>
        public bool IsDefault { get; set; }
    }

}
